package se.kth.ict.id2203.assignment4;

import se.sics.kompics.launch.Scenario;
import se.sics.kompics.launch.Topology;

@SuppressWarnings("serial")
public final class Assignment4Executor {
	
	public static final boolean PRINT_HEARTBEATS = false;

	public static final void main(String[] args) {

		/*
		 * specify the topology and the characteristics of the network
		 * connecting the processes
		 */
		Topology topology1 = new Topology() {
			{
				node(1, "127.0.0.1", 22031);
				node(2, "127.0.0.1", 22032);
				node(3, "127.0.0.1", 22033);
				
				link(1, 2, 2500, 0).bidirectional();
				link(1, 3, 2000, 0).bidirectional();
				link(2, 3, 1750, 0).bidirectional();
			}
		};


		Scenario scenario1 = new Scenario(Assignment4Main.class) {
			{
				command(1, "P1-7:D100:P3-5:P4-9:D10000:W");
				command(2, "", 100);
				command(3, "", 200);
				
				
				
				
				
				
				//command(4, "S200");
			}
		};

		/*
		 * the launcher will check automatically that topology1 is fully connected
		 */
		scenario1.executeOnFullyConnected(topology1);
		
		System.exit(0);

	}
}
